package com.css.dzj.dzjap.modules.record.approject.service;


import com.css.dzj.dzjap.modules.publick.entity.ApPublicEntity;
import com.css.dzj.dzjap.modules.record.approject.entity.ApRecordEntity;
import com.css.dzj.dzjap.modules.record.community.entity.ApRecordGainEntity;
import com.querydsl.core.QueryResults;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * 备案接口
 *
 * @author zhouchanghe
 */
public interface ApRecordService {

    /**
     * 分页查询
     *
     * @param pageable
     * @return
     */
    Page<ApRecordEntity> getAllPage(Pageable pageable);


    QueryResults<ApRecordEntity> getPage(String userName, String recordProjectName, String recordProjectType, String status,
                                         String recordUser, String recordTimeStart, String recordTimeEnd, String recordProjectAddress, String reportStatus, Pageable pageable);

    /**
     * 备案添加
     *
     * @param apRecordEntity
     */
    void save(ApRecordEntity apRecordEntity);

    /**
     * 备案暂存
     *
     * @param apRecordEntity
     */
    void zcsave(ApRecordEntity apRecordEntity);

    /**
     * 通过id查询备案
     *
     * @param id
     * @return
     */
    ApRecordEntity queryApRecordById(String id);

    /**
     * 备案更新
     *
     * @param apRecordEntity
     */
    void update(ApRecordEntity apRecordEntity);

    /**
     * 备案审批
     *
     * @param apRecordEntity
     */
    void check(ApRecordEntity apRecordEntity);
    /**
     * 备案撤回
     *
     * @param apRecordEntity
     */
    void cancel(ApRecordEntity apRecordEntity);

    /**
     * 通过备案等级查询备案
     *
     * @param recordLevel
     * @return
     */
    List<ApRecordEntity> getApRecordListByRecordLevel(String location, String recordLevel);

    /**
     * 备案提交
     *
     * @param apRecordEntity
     */
    void submit(ApRecordEntity apRecordEntity);

    /**
     * 获取涉核和国家水电工程项目
     *
     * @param
     * @return
     * @author zhouchanghe
     * @description TODO
     * @date 2019/12/25 10:22
     **/

    QueryResults<ApRecordEntity> getShPage(String recordProjectName, String recordProjectType, String status,
                                           String recordUser, String recordTimeStart, String recordTimeEnd, String recordProjectAddress, String reportStatus, Pageable pageable);

    /*
     增加公开公告
    */
    String addHandle(ApPublicEntity pub);

    void updatestatus(String id);

    /**
     * 根据项目名称查找ApRecordEntity信息
     *
     * @return
     * @Author liyuan
     */
    ApRecordEntity queryByProName(String proName);

    List<ApRecordEntity > findAll();
}
